﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;

public partial class User_UserMasterPage : System.Web.UI.MasterPage
{
    CatalogBUS cataBUS = new CatalogBUS();
    DataTable tbCatalog = new DataTable();
    DataView viewCatalog;
    MemberBUS memBUS = new MemberBUS();
    DataTable tbMem = new DataTable();

    protected void Page_Load(object sender, EventArgs e)
    {

        if (Session["SLItem"] == null)
        {
            txtSL.Text = "0";
        }
        else
        {
            txtSL.Text = Session["SLItem"].ToString();
        }
        LoadData();
        if (Session["ID"] != null)
        {
            Panel1.Visible = true;
            MultiView1.ActiveViewIndex = 1;
        }
        else
        {
            MultiView1.ActiveViewIndex = 0;
        }

    }

    private void LoadData()
    {

        tbCatalog = cataBUS.returnAllCatalog();
        viewCatalog = new DataView(tbCatalog);
        dlCatalog.DataSource = viewCatalog;
        dlCatalog.DataBind();
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Session["ID"] = null;
        Session["User"] = null;
        Response.Redirect("Home.aspx");
    }
}
